package com.jz.pay3.design.brige;

public class Client {
    public static void main(String[] args) {
        System.out.println("===================桥接模式=====================");
        System.out.println("要点：");
        System.out.println("    1.可以新增任意一种转账方式，用户即可使用该方式转账");
        System.out.println("    2.可以新增任意一种账户，该账户即可使用所有转账方式");
        User custUser1 = new CustUser(new ATMTransfer());
        custUser1.login();
        custUser1.transfer();
        User custUser2 = new CustUser(new TableTransfer());
        custUser2.login();
        custUser2.transfer();
        User custUser3 = new CustUser(new NetworkTransfer());
        custUser3.login();
        custUser3.transfer();
        System.out.println("========================================");
        User vipUser1 = new VipUser(new ATMTransfer());
        vipUser1.login();
        vipUser1.transfer();
        User vipUser2 = new VipUser(new TableTransfer());
        vipUser2.login();
        vipUser2.transfer();
        User vipUser3 = new VipUser(new NetworkTransfer());
        vipUser3.login();
        vipUser3.transfer();
        System.out.println("========================================");
        User svipUser1 = new SvipUser(new ATMTransfer());
        svipUser1.login();
        svipUser1.transfer();
        User svipUser2 = new SvipUser(new TableTransfer());
        svipUser2.login();
        svipUser2.transfer();
        User svipUser3 = new SvipUser(new NetworkTransfer());
        svipUser3.login();
        svipUser3.transfer();
    }
}
